<?php
    header('Access-Control-Allow-Origin: *');
    header('Content-Type:application/json;charset=utf-8');
    $con = mysqli_connect("127.0.0.1", "root", "root", "mydb");
    $classId = $_GET['classId'];
    $sql = "SELECT * FROM lesson WHERE l_id = '$classId';";
    $res = mysqli_query($con,$sql);
    while($row = mysqli_fetch_array($res)){
        $signLocation = array(
            'isSign' => $row['isSign'],
            'signPwd' => $row['signPwd'],
            'signLocation' => $row['sign_location']
        );
    }
    echo json_encode($signLocation);
    mysqli_close($con);
?>